package com.qdlc.p2p.biz.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.service.GoodsPicService;
import com.qdlc.p2p.dal.dao.GoodsPicDao;
import com.qdlc.p2p.dal.dto.GoodsPic;

@Service("goodsPicService")
public class GoodsPicServiceImpl implements GoodsPicService {

    @Resource
    private GoodsPicDao goodsPicDao;

    @Override
    public void deleteGoodsPic(long id) {
        goodsPicDao.delete(id);
    }

    @Override
    public List<GoodsPic> getGoodsPicByGoodsId(long goodsId) {
        return goodsPicDao.findByProperty("goods.id", goodsId);
    }

}
